﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Marmat.Foundation
{
    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="Entity"></typeparam>
    /// <typeparam name="Source"></typeparam>
    public interface ISelectionRecordMultiPaginationForm<Entity, Source> : IBasicSelectionRecordPaginationForm<Entity, Source>
    {
        /// <summary>
        /// 显示窗体。
        /// </summary>
        bool ShowDialog(out Entity[] result);

        /// <summary>
        /// 数据验证
        /// </summary>
        Func<Entity[], bool> Verify { get; set; }

        /// <summary>
        /// 获取或设置当前已存在的数据集。
        /// </summary>
        IEnumerable<Entity> DataSource { get; set; }

        /// <summary>
        /// 比较对象是否相同。
        /// </summary>
        Func<Entity, Entity, bool> Equals { get; set; }

    }

    /// <summary>
    /// 
    /// </summary>
    public interface ISelectionRecordMultiPaginationForm : ISelectionRecordMultiPaginationForm<System.Data.DataRow, System.Data.DataTable>
    {
    }

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="Entity"></typeparam>
    public interface ISelectionRecordMultiPaginationForm<Entity> : ISelectionRecordMultiPaginationForm<Entity, IEnumerable<Entity>>
    {
    }
}
